/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package lianxi.demo;

import java.util.Vector;

/**
 *
 * @author Administrator
 */
public class VectorDemo3 {
    public static void main(String[] args) {
          Vector  a2=new Vector();
          for(int i=1;i<=10;i++){
          a2.add("第"+i+"个小孩"); 
          }
          System.out.println(a2);
          for(;;){if(a2.size()==1)break;
          for(int b=0;b<2;b++){
          a2.add(a2.get(0));
          a2.remove(0);
              System.out.println("当前容器的内容是：");
              System.out.println(a2);
          }
          a2.remove(0);
          }
          System.out.println ("最后容器的内容是：");
          System.out.println (a2);
    }
    
}
